package crivia.ecp.carry.eb;

import java.util.HashMap;
import java.util.Map;

import crivia.ecp.ECP;
import crivia.ecp.p.TopTab;

public class TabPageRegister {
	
	public TabPageRegister(Class<? extends TopTab> topTab, TabPage tabPage) {
		super();
		this.topTab = topTab;
		this.tabPage = tabPage;
	}
	
	public TabPageRegister(Class<? extends TopTab> topTab, ECP ecp) {
		super();
		this.topTab = topTab;
		this.tabPage = new TabPage("", ecp.getClass());
	}

	private Class<? extends TopTab> topTab;
	public Class<? extends TopTab> getTopTab() {
		return topTab;
	}
	public void setTopTab(Class<? extends TopTab> topTab) {
		this.topTab = topTab;
	}
	
	private TabPage tabPage;
	public TabPage getTabPage() {
		return tabPage;
	}
	public void setTabPage(TabPage tabPage) {
		this.tabPage = tabPage;
	}
	
	private Map<String,String> parameters = new HashMap<String, String>();
	public Map<String, String> getParameters() {
		return parameters;
	}
	public String getParameter(String key) {
		return parameters.get(key);
	}
	public TabPageRegister setParameters(Map<String, String> parameters) {
		this.parameters = parameters;
		return this;
	}
	public TabPageRegister addParameters(String key , String value) {
		parameters.put(key, value);
		return this;
	}
	

}
